package org.usixml.model.client.ui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

public class UserInterfacePanel extends JPanel {
    
    private JList lstScreenGroups;
    private JList lstScreens;
    private JList lstScreenFragments;
    private JList lstScreenElements;
    
    public UserInterfacePanel() {
        initComponent();
    }
    
    private void initComponent() {
        this.setLayout(new BorderLayout());
        
        JPanel pnlTitle = new JPanel(new FlowLayout(FlowLayout.LEFT));
        pnlTitle.add(new JLabel("<html><b>User Interface</b></html>"));
        pnlTitle.setBackground(Color.LIGHT_GRAY);
        this.add(pnlTitle, BorderLayout.NORTH);
        
        JPanel pnlUserInterfaceArea = new JPanel(new GridLayout(4,1));
        
        JPanel pnlScreenGroups = new JPanel(new BorderLayout());
        pnlScreenGroups.setBorder(BorderFactory.createTitledBorder(" Screen Groups "));
        String[] screenGroups = {"B.Application Closure FBB_BRI"};
        lstScreenGroups = new JList(screenGroups);
        pnlScreenGroups.add(new JScrollPane(lstScreenGroups), BorderLayout.CENTER);
        pnlUserInterfaceArea.add(pnlScreenGroups);
        
        JPanel pnlScreens = new JPanel(new BorderLayout());
        pnlScreens.setBorder(BorderFactory.createTitledBorder(" Screens "));
        String[] screens = {"SC_P_Application_Closure_Basis_FBB_BRI"};
        lstScreens = new JList(screens);
        pnlScreens.add(new JScrollPane(lstScreens), BorderLayout.CENTER);
        pnlUserInterfaceArea.add(pnlScreens);
        
        JPanel pnlScreenFragments = new JPanel(new BorderLayout());
        pnlScreenFragments.setBorder(BorderFactory.createTitledBorder("Screen Fragments"));
        String[] screenFragments = {"SFG_Personaldata", "SF_Applicant_Choice"};
        lstScreenFragments = new JList(screenFragments);
        pnlScreenFragments.add(new JScrollPane(lstScreenFragments), BorderLayout.CENTER);
        pnlUserInterfaceArea.add(pnlScreenFragments);
        
        JPanel pnlScreenElements = new JPanel(new BorderLayout());
        pnlScreenElements.setBorder(BorderFactory.createTitledBorder("Screen Elements"));
        String[] screenElements = {"SE_Applicant_List", "SE_Applicant_Lookup", "SE_Applicant_Name", "SE_Applicant_Lastname", "SE_Applicant_Country", "SE_Applicant_Birthdate"};
        lstScreenElements = new JList(screenElements);
        pnlScreenElements.add(new JScrollPane(lstScreenElements), BorderLayout.CENTER);
        pnlUserInterfaceArea.add(pnlScreenElements);
        
        this.add(pnlUserInterfaceArea, BorderLayout.CENTER);
    }
}
